[PB-4948]: fix/allow uploading empty files#1782
Conversation
Deploying drive-web with
|
| Latest commit: |
077d1b2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dc0b8390.drive-web.pages.dev |
| Branch Preview URL: | https://feature-upload-empty-files.drive-web.pages.dev |
| if (!fileId) { | ||
| throw new FileIdRequiredError(); | ||
| } |
There was a problem hiding this comment.
I left this comment in order to check if the upload of empty files are already implemented in backend for workspaces in order to remove this check
|
|
||
| const isWorkspacesUpload = workspaceId && workspacesToken; | ||
|
|
||
| if (isFileEmpty(file.content) && !isWorkspacesUpload) { |
There was a problem hiding this comment.
I left this comment in order to check if the upload of empty files are already implemented in backend for workspaces to remove this condition && !isWorkspacesUpload
|
|
||
| export class RetryableFileError extends Error { | ||
| constructor(public file: FileToUpload) { | ||
| super('Retryable file'); |
There was a problem hiding this comment.
What is 'Retryable file' error means?
There was a problem hiding this comment.
It is an error already throw for us when the downloaded file does not have file ID. You can check it here, where I just extracted the error from the service, but it was already used.
There was a problem hiding this comment.
why it's not FileIdRequiredError then?
There was a problem hiding this comment.
I see that the error is only used there. Another teammate added it in the past, but not sure why. I'm going to update it using the name you suggested or similar, yes.
|
@xabg2 79,2% Almost!!! |
|



Description
Allow the user to create empty files.
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes
The status of this PR has been updated back to “Draft” because we must wait for the other platforms to allow empty files to upload/download empty files, but the request can be reviewed in the meantime so that it can be implemented when necessary.